3.2.13 \(\int \frac {x^2 (a+b \arctan (c x))^2}{(d+i c d x)^3} \, dx\) [113]

3.2.13.1 Optimal result
3.2.13.2 Mathematica [A] (verified)
3.2.13.3 Rubi [A] (verified)
3.2.13.4 Maple [C] (warning: unable to verify)
3.2.13.5 Fricas [F]
3.2.13.6 Sympy [F(-1)]
3.2.13.7 Maxima [F]
3.2.13.8 Giac [F]
3.2.13.9 Mupad [F(-1)]

3.2.13.1 Optimal result

Integrand size = 25, antiderivative size = 304 \[ \int \frac {x^2 (a+b \arctan (c x))^2}{(d+i c d x)^3} \, dx=-\frac {i b^2}{16 c^3 d^3 (i-c x)^2}+\frac {13 b^2}{16 c^3 d^3 (i-c x)}-\frac {13 b^2 \arctan (c x)}{16 c^3 d^3}+\frac {b (a+b \arctan (c x))}{4 c^3 d^3 (i-c x)^2}+\frac {7 i b (a+b \arctan (c x))}{4 c^3 d^3 (i-c x)}-\frac {7 i (a+b \arctan (c x))^2}{8 c^3 d^3}+\frac {i (a+b \arctan (c x))^2}{2 c^3 d^3 (i-c x)^2}-\frac {2 (a+b \arctan (c x))^2}{c^3 d^3 (i-c x)}-\frac {i (a+b \arctan (c x))^2 \log \left (\frac {2}{1+i c x}\right )}{c^3 d^3}+\frac {b (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2}{1+i c x}\right )}{c^3 d^3}-\frac {i b^2 \operatorname {PolyLog}\left (3,1-\frac {2}{1+i c x}\right )}{2 c^3 d^3} \]

output
-1/16*I*b^2/c^3/d^3/(I-c*x)^2+13/16*b^2/c^3/d^3/(I-c*x)-13/16*b^2*arctan(c 
*x)/c^3/d^3+1/4*b*(a+b*arctan(c*x))/c^3/d^3/(I-c*x)^2+7/4*I*b*(a+b*arctan( 
c*x))/c^3/d^3/(I-c*x)-7/8*I*(a+b*arctan(c*x))^2/c^3/d^3+1/2*I*(a+b*arctan( 
c*x))^2/c^3/d^3/(I-c*x)^2-2*(a+b*arctan(c*x))^2/c^3/d^3/(I-c*x)-I*(a+b*arc 
tan(c*x))^2*ln(2/(1+I*c*x))/c^3/d^3+b*(a+b*arctan(c*x))*polylog(2,1-2/(1+I 
*c*x))/c^3/d^3-1/2*I*b^2*polylog(3,1-2/(1+I*c*x))/c^3/d^3
 
3.2.13.2 Mathematica [A] (verified)

Time = 1.07 (sec) , antiderivative size = 431, normalized size of antiderivative = 1.42 \[ \int \frac {x^2 (a+b \arctan (c x))^2}{(d+i c d x)^3} \, dx=\frac {\frac {96 i a^2}{(-i+c x)^2}+\frac {384 a^2}{-i+c x}-192 a^2 \arctan (c x)+96 i a^2 \log \left (1+c^2 x^2\right )-b^2 \left (128 \arctan (c x)^3+72 i \cos (2 \arctan (c x))-144 \arctan (c x) \cos (2 \arctan (c x))-144 i \arctan (c x)^2 \cos (2 \arctan (c x))-3 i \cos (4 \arctan (c x))+12 \arctan (c x) \cos (4 \arctan (c x))+24 i \arctan (c x)^2 \cos (4 \arctan (c x))+192 i \arctan (c x)^2 \log \left (1+e^{2 i \arctan (c x)}\right )+192 \arctan (c x) \operatorname {PolyLog}\left (2,-e^{2 i \arctan (c x)}\right )+96 i \operatorname {PolyLog}\left (3,-e^{2 i \arctan (c x)}\right )+72 \sin (2 \arctan (c x))+144 i \arctan (c x) \sin (2 \arctan (c x))-144 \arctan (c x)^2 \sin (2 \arctan (c x))-3 \sin (4 \arctan (c x))-12 i \arctan (c x) \sin (4 \arctan (c x))+24 \arctan (c x)^2 \sin (4 \arctan (c x))\right )-12 a b \left (32 \arctan (c x)^2-12 \cos (2 \arctan (c x))+\cos (4 \arctan (c x))+16 \operatorname {PolyLog}\left (2,-e^{2 i \arctan (c x)}\right )+12 i \sin (2 \arctan (c x))-i \sin (4 \arctan (c x))+4 \arctan (c x) \left (-6 i \cos (2 \arctan (c x))+i \cos (4 \arctan (c x))+8 i \log \left (1+e^{2 i \arctan (c x)}\right )-6 \sin (2 \arctan (c x))+\sin (4 \arctan (c x))\right )\right )}{192 c^3 d^3} \]

input
Integrate[(x^2*(a + b*ArcTan[c*x])^2)/(d + I*c*d*x)^3,x]
 
output
(((96*I)*a^2)/(-I + c*x)^2 + (384*a^2)/(-I + c*x) - 192*a^2*ArcTan[c*x] + 
(96*I)*a^2*Log[1 + c^2*x^2] - b^2*(128*ArcTan[c*x]^3 + (72*I)*Cos[2*ArcTan 
[c*x]] - 144*ArcTan[c*x]*Cos[2*ArcTan[c*x]] - (144*I)*ArcTan[c*x]^2*Cos[2* 
ArcTan[c*x]] - (3*I)*Cos[4*ArcTan[c*x]] + 12*ArcTan[c*x]*Cos[4*ArcTan[c*x] 
] + (24*I)*ArcTan[c*x]^2*Cos[4*ArcTan[c*x]] + (192*I)*ArcTan[c*x]^2*Log[1 
+ E^((2*I)*ArcTan[c*x])] + 192*ArcTan[c*x]*PolyLog[2, -E^((2*I)*ArcTan[c*x 
])] + (96*I)*PolyLog[3, -E^((2*I)*ArcTan[c*x])] + 72*Sin[2*ArcTan[c*x]] + 
(144*I)*ArcTan[c*x]*Sin[2*ArcTan[c*x]] - 144*ArcTan[c*x]^2*Sin[2*ArcTan[c* 
x]] - 3*Sin[4*ArcTan[c*x]] - (12*I)*ArcTan[c*x]*Sin[4*ArcTan[c*x]] + 24*Ar 
cTan[c*x]^2*Sin[4*ArcTan[c*x]]) - 12*a*b*(32*ArcTan[c*x]^2 - 12*Cos[2*ArcT 
an[c*x]] + Cos[4*ArcTan[c*x]] + 16*PolyLog[2, -E^((2*I)*ArcTan[c*x])] + (1 
2*I)*Sin[2*ArcTan[c*x]] - I*Sin[4*ArcTan[c*x]] + 4*ArcTan[c*x]*((-6*I)*Cos 
[2*ArcTan[c*x]] + I*Cos[4*ArcTan[c*x]] + (8*I)*Log[1 + E^((2*I)*ArcTan[c*x 
])] - 6*Sin[2*ArcTan[c*x]] + Sin[4*ArcTan[c*x]])))/(192*c^3*d^3)
 
3.2.13.3 Rubi [A] (verified)

Time = 0.71 (sec) , antiderivative size = 304, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.080, Rules used = {5411, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {x^2 (a+b \arctan (c x))^2}{(d+i c d x)^3} \, dx\)

\(\Big \downarrow \) 5411

\(\displaystyle \int \left (\frac {i (a+b \arctan (c x))^2}{c^2 d^3 (c x-i)}-\frac {2 (a+b \arctan (c x))^2}{c^2 d^3 (c x-i)^2}-\frac {i (a+b \arctan (c x))^2}{c^2 d^3 (c x-i)^3}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {b \operatorname {PolyLog}\left (2,1-\frac {2}{i c x+1}\right ) (a+b \arctan (c x))}{c^3 d^3}+\frac {7 i b (a+b \arctan (c x))}{4 c^3 d^3 (-c x+i)}+\frac {b (a+b \arctan (c x))}{4 c^3 d^3 (-c x+i)^2}-\frac {2 (a+b \arctan (c x))^2}{c^3 d^3 (-c x+i)}+\frac {i (a+b \arctan (c x))^2}{2 c^3 d^3 (-c x+i)^2}-\frac {7 i (a+b \arctan (c x))^2}{8 c^3 d^3}-\frac {i \log \left (\frac {2}{1+i c x}\right ) (a+b \arctan (c x))^2}{c^3 d^3}-\frac {13 b^2 \arctan (c x)}{16 c^3 d^3}-\frac {i b^2 \operatorname {PolyLog}\left (3,1-\frac {2}{i c x+1}\right )}{2 c^3 d^3}+\frac {13 b^2}{16 c^3 d^3 (-c x+i)}-\frac {i b^2}{16 c^3 d^3 (-c x+i)^2}\)

input
Int[(x^2*(a + b*ArcTan[c*x])^2)/(d + I*c*d*x)^3,x]
 
output
((-1/16*I)*b^2)/(c^3*d^3*(I - c*x)^2) + (13*b^2)/(16*c^3*d^3*(I - c*x)) - 
(13*b^2*ArcTan[c*x])/(16*c^3*d^3) + (b*(a + b*ArcTan[c*x]))/(4*c^3*d^3*(I 
- c*x)^2) + (((7*I)/4)*b*(a + b*ArcTan[c*x]))/(c^3*d^3*(I - c*x)) - (((7*I 
)/8)*(a + b*ArcTan[c*x])^2)/(c^3*d^3) + ((I/2)*(a + b*ArcTan[c*x])^2)/(c^3 
*d^3*(I - c*x)^2) - (2*(a + b*ArcTan[c*x])^2)/(c^3*d^3*(I - c*x)) - (I*(a 
+ b*ArcTan[c*x])^2*Log[2/(1 + I*c*x)])/(c^3*d^3) + (b*(a + b*ArcTan[c*x])* 
PolyLog[2, 1 - 2/(1 + I*c*x)])/(c^3*d^3) - ((I/2)*b^2*PolyLog[3, 1 - 2/(1 
+ I*c*x)])/(c^3*d^3)
 

3.2.13.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 5411
Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_ 
.)*(x_))^(q_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*ArcTan[c*x])^p, (f* 
x)^m*(d + e*x)^q, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[p, 0] & 
& IntegerQ[q] && (GtQ[q, 0] || NeQ[a, 0] || IntegerQ[m])
 
3.2.13.4 Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 6.79 (sec) , antiderivative size = 960, normalized size of antiderivative = 3.16

method result size
derivativedivides \(\text {Expression too large to display}\) \(960\)
default \(\text {Expression too large to display}\) \(960\)
parts \(\text {Expression too large to display}\) \(1015\)

input
int(x^2*(a+b*arctan(c*x))^2/(d+I*c*d*x)^3,x,method=_RETURNVERBOSE)
 
output
1/c^3*(1/2*I*a^2/d^3/(c*x-I)^2+2*a^2/d^3/(c*x-I)-7/4*I*a*b/d^3/(c*x-I)-a^2 
/d^3*arctan(c*x)+b^2/d^3*(3*I*(c*x+I)/(8*c*x-8*I)+2*arctan(c*x)^2/(c*x-I)+ 
I*arctan(c*x)^2*ln(c*x-I)+1/2*I*arctan(c*x)^2/(c*x-I)^2-2/3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I)^2+1/4*a*b/d^3/(c*x-I)^2-7/16*a*b/d^3*ln(c^2*x 
^2+1)+2*I*a*b/d^3*arctan(c*x)*ln(c*x-I)+a*b/d^3*ln(c*x-I)*ln(-1/2*I*(c*x+I 
))+a*b/d^3*dilog(-1/2*I*(c*x+I))-1/2*a*b/d^3*ln(c*x-I)^2)
 
3.2.13.5 Fricas [F]

\[ \int \frac {x^2 (a+b \arctan (c x))^2}{(d+i c d x)^3} \, dx=\int { \frac {{\left (b \arctan \left (c x\right ) + a\right )}^{2} x^{2}}{{\left (i \, c d x + d\right )}^{3}} \,d x } \]

input
integrate(x^2*(a+b*arctan(c*x))^2/(d+I*c*d*x)^3,x, algorithm="fricas")
 
output
integral(1/4*(-I*b^2*x^2*log(-(c*x + I)/(c*x - I))^2 - 4*a*b*x^2*log(-(c*x 
 + I)/(c*x - I)) + 4*I*a^2*x^2)/(c^3*d^3*x^3 - 3*I*c^2*d^3*x^2 - 3*c*d^3*x 
 + I*d^3), x)
 
3.2.13.6 Sympy [F(-1)]

Timed out. \[ \int \frac {x^2 (a+b \arctan (c x))^2}{(d+i c d x)^3} \, dx=\text {Timed out} \]

input
integrate(x**2*(a+b*atan(c*x))**2/(d+I*c*d*x)**3,x)
 
output
Timed out
 
3.2.13.7 Maxima [F]

\[ \int \frac {x^2 (a+b \arctan (c x))^2}{(d+i c d x)^3} \, dx=\int { \frac {{\left (b \arctan \left (c x\right ) + a\right )}^{2} x^{2}}{{\left (i \, c d x + d\right )}^{3}} \,d x } \]

input
integrate(x^2*(a+b*arctan(c*x))^2/(d+I*c*d*x)^3,x, algorithm="maxima")
 
output
1/128*(144*a^2*c^2*x^2*arctan2(1, c*x) - 32*a^2*c*x*(9*I*arctan2(1, c*x) - 
 8) - 32*(b^2*c^2*x^2 - 2*I*b^2*c*x - b^2)*arctan(c*x)^3 + 4*(-I*b^2*c^2*x 
^2 - 2*b^2*c*x + I*b^2)*log(c^2*x^2 + 1)^3 - 48*a^2*(3*arctan2(1, c*x) + 4 
*I) + 16*(4*b^2*c*x - 3*I*b^2)*arctan(c*x)^2 - 4*(4*b^2*c*x - 3*I*b^2 + 2* 
(b^2*c^2*x^2 - 2*I*b^2*c*x - b^2)*arctan(c*x))*log(c^2*x^2 + 1)^2 + 6*(I*b 
^2*c^6*d^3*x^2 + 2*b^2*c^5*d^3*x - I*b^2*c^4*d^3)*(((8*c^2*x^2 + 7)*c^2/(c 
^14*d^3*x^4 + 2*c^12*d^3*x^2 + c^10*d^3) + 2*(4*c^2*x^2 + 3)*log(c^2*x^2 + 
 1)/(c^12*d^3*x^4 + 2*c^10*d^3*x^2 + c^8*d^3))*c^4 + 2*(2*c^2*x^2 + 1)*c^2 
*log(c^2*x^2 + 1)^2/(c^10*d^3*x^4 + 2*c^8*d^3*x^2 + c^6*d^3) - c^2*(c^2/(c 
^12*d^3*x^4 + 2*c^10*d^3*x^2 + c^8*d^3) + 2*log(c^2*x^2 + 1)/(c^10*d^3*x^4 
 + 2*c^8*d^3*x^2 + c^6*d^3)) - 512*c^2*integrate(1/16*x^3*arctan(c*x)^2/(c 
^8*d^3*x^6 + 3*c^6*d^3*x^4 + 3*c^4*d^3*x^2 + c^2*d^3), x) - 2*log(c^2*x^2 
+ 1)^2/(c^8*d^3*x^4 + 2*c^6*d^3*x^2 + c^4*d^3) + 512*integrate(1/16*x*arct 
an(c*x)^2/(c^8*d^3*x^6 + 3*c^6*d^3*x^4 + 3*c^4*d^3*x^2 + c^2*d^3), x)) - 4 
*(-I*b^2*c^8*d^3*x^2 - 2*b^2*c^7*d^3*x + I*b^2*c^6*d^3)*(((8*c^2*x^2 + 7)* 
c^2/(c^14*d^3*x^4 + 2*c^12*d^3*x^2 + c^10*d^3) + 2*(4*c^2*x^2 + 3)*log(c^2 
*x^2 + 1)/(c^12*d^3*x^4 + 2*c^10*d^3*x^2 + c^8*d^3))*c^2 + 512*c^2*integra 
te(1/16*x^5*arctan(c*x)^2/(c^8*d^3*x^6 + 3*c^6*d^3*x^4 + 3*c^4*d^3*x^2 + c 
^2*d^3), x) + 128*c^2*integrate(1/16*x^5*log(c^2*x^2 + 1)^2/(c^8*d^3*x^6 + 
 3*c^6*d^3*x^4 + 3*c^4*d^3*x^2 + c^2*d^3), x) + 2*(2*c^2*x^2 + 1)*log(c...
 
3.2.13.8 Giac [F]

\[ \int \frac {x^2 (a+b \arctan (c x))^2}{(d+i c d x)^3} \, dx=\int { \frac {{\left (b \arctan \left (c x\right ) + a\right )}^{2} x^{2}}{{\left (i \, c d x + d\right )}^{3}} \,d x } \]

input
integrate(x^2*(a+b*arctan(c*x))^2/(d+I*c*d*x)^3,x, algorithm="giac")
 
output
sage0*x
 
3.2.13.9 Mupad [F(-1)]

Timed out. \[ \int \frac {x^2 (a+b \arctan (c x))^2}{(d+i c d x)^3} \, dx=\int \frac {x^2\,{\left (a+b\,\mathrm {atan}\left (c\,x\right )\right )}^2}{{\left (d+c\,d\,x\,1{}\mathrm {i}\right )}^3} \,d x \]

input
int((x^2*(a + b*atan(c*x))^2)/(d + c*d*x*1i)^3,x)
 
output
int((x^2*(a + b*atan(c*x))^2)/(d + c*d*x*1i)^3, x)